package com.test;

import java.net.URI;
import java.util.List;
import java.util.Map;

import com.alibaba.dubbo.demo.Person;
import com.alibaba.dubbo.demo.Student;
import com.alibaba.dubbo.demo.Teacher;

import feign.HeaderMap;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

@Headers({ "Accept: application/json" })
public interface FeignService {

	@RequestLine("GET /sen/{owner}/{age}")
	List<Student> contributors0(@Param("owner") String owner, @Param("age") Integer age, URI uri);

	@RequestLine("GET /sen/{owner}/{age}")
	List<Student> contributors(@Param("owner") String owner, @Param("age") Integer age);

	@RequestLine("GET /{url}")
	RespData<Object> contributors1(@Param("url") String url);

	@RequestLine("POST /sen2")
	@Headers({ "Content-Type: application/json", "token: {token}" })
	List<Student> contributors2(@Param("token") String token, List<Student> students);

	@RequestLine("POST /sen3")
	@Headers({ "Content-Type: application/json", "token: {token}" })
	<T extends Person> Person contributors3(@Param("token") String token, T t);

	@RequestLine("POST /sen4")
	@Headers({ "Content-Type: application/json", "token: {token}" })
	<T extends Person> List<Person> contributors4(@Param("token") String token, List<T> students);

	@RequestLine("POST /test2/{aa}/{bb}")
	@Headers({ "Content-Type: application/x-www-form-urlencoded;charset=UTF-8", "token: {token}" })
	Student contributors5(@Param("aa") String aa, @Param("bb") String bb, @Param("cars[]") String[] cars, @Param("token") String token, @Param("name1") String name1, @Param("studentNo") String studentNo);

	@RequestLine("POST /sen")
	@Headers({ "Content-Type: application/json" })
	List<Student> contributors(@HeaderMap Map headMap, Teacher teacher);

}
